#location where config files will be stored

BASEDIR = '.rsspackrat'
STORAGE = 'database.mk4'
CONFIGURATION = 'settings.yml'

import os
import os.path
import platform

def get_base_path():
    homevar = '$HOME'
    system = platform.system() 
    if system.lower() == 'windows':
        homevar = '$HOMEDRIVE$HOMEPATH' #see http://snipplr.com/view/7354/get-home-directory-path--in-python-win-lin-other/ if this doesn't work
    path = os.path.expandvars("%s/%s" % (homevar, BASEDIR))
    os.path.normpath(path)
    if not os.path.exists(path):
        os.makedirs(path)
    return path + os.path.sep 

CONFDIR = get_base_path()
DB_PATH = os.path.join(CONFDIR, STORAGE)
CONF_PATH = os.path.join(CONFDIR, CONFIGURATION)